package com.lx.poi;

import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.joda.time.DateTime;
import org.junit.Test;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Date;

public class ReadExcel {
    String PATH = "E:\\ok\\poi\\";

    @Test
    public void testPoi03() throws Exception {
        FileInputStream fileInputStream = new FileInputStream(PATH + "poi03.xls");
        Workbook workbook = new HSSFWorkbook(fileInputStream);
        Sheet sheet = workbook.getSheetAt(0);
        Row row1 = sheet.getRow(1);
        Cell cell = row1.getCell(0);
        String value = cell.getStringCellValue();
        System.out.println(value);
    }

}
